package com.wva.common.status;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 基础
 */

@Getter
@AllArgsConstructor
public enum StatusEnum implements Status {
    //通用响应
    OK(0, "success"),
    ERROR(1, "error"),

    //表示状态，非异常
    //视频已合并
    VIDEO_MERGED(3_001, "上传成功"),

    //业务异常
    /** springmvc、validate等的参数校验异常 */
    PARAMS_CHECK_FAIL(4_001, "参数校验异常"),

    /** springmvc缺少参数 */
    PARAMS_MISSING(4_002, "缺少参数"),

    /** 直接访问内网微服务 */
    ILLEGAL_ACCESS(4_003, "非法访问"),

    UNAUTHORIZED(4_004, "用户未登录"),

    PERMISSION_DENIED(4_005, "权限不足"),

    REQUIRE_PICTURE_CAPTCHA(4_006, "本次请求需要图形验证码"),

    //系统异常
    INTERNAL_ERROR(5_001, "系统异常"),
    UNKNOWN_ERROR(5_002, "发生未知错误"),
    BUSY(5_003, "系统繁忙");

    private final int code;
    private final String message;
}
